'use strict';
import * as Koa from 'koa';
import { router, prefix } from '../middleware/router';
import { response } from '../middleware/result';
import { merchanthistoryService } from '../service/merchanthistory';

/** 酒币api对象 */
@prefix('merchanthistory')
class MerchanthistoryController {
    /**
     * 
     * @api {post} /wine/query  查询酒币消费明细
     * @apiDescription 查询酒币消费明细
     * @apiName query
     * @apiParam (参数) {String} offset   页码
     * @apiParam (参数) {String} limit    每页显示条数
     * @apiParam (参数) {String} mid  商户id
     * @apiSampleRequest /wine/query
     * @apiGroup wine
     * @apiVersion 1.0.0
     */
    @router('/query', { method: 'post' })
    async query(ctx: Koa.Context) {
        let result = await merchanthistoryService.query(ctx.request.body);
        response(ctx, result);
    }
}